﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SignalShopBase;

namespace TestModule
{
    public class RectifyModule : SignalShopModule
    {
        public RectifyModule() : base(NAME, PATH) {}

        public override void Execute(Signal target, Signal source)
        {
            int N = target.N;

            for (int n = -N; n <= N; n++)
            {
                if (target[n].X < 0) target[n].X = 0;
            }
        }

        private const string NAME = "Rectify";
        private const string PATH = "Transform/Rectify";
    }
}
